@echo off
setlocal

:: 提前配置好obsutil
:: obsutils -i=ak -k=sk -e=endpoint

:: 使用wmic命令获取当前日期
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set datetime=%%a

:: 提取年、月、日
set year=%datetime:~0,4%
set month=%datetime:~4,2%
set day=%datetime:~6,2%

:: 目录名
set dirName=%year%-%month%-%day%

echo %dirName%

obsutil cp -r xx/ obs://backup/%dirName%

endlocal